{extend name="public:base" /}
{block name="head"}
<link href="__PUBLIC__/view_res/mobile/css/wshop_companyreg.css" type="text/css" rel="Stylesheet" />
<link href="__PUBLIC__/jquery-weui/dist/lib/weui.min.css" type="text/css" rel="Stylesheet" />
<link href="__PUBLIC__/jquery-weui/dist/css/jquery-weui.min.css" type="text/css" rel="Stylesheet" />
<link rel="stylesheet" href="/public/static/js/bt/bootstrap.min.css" />

<link rel="stylesheet" href="/public/static/font-awesome/4.7.0/css/font-awesome.min.css" />
        <!-- ace styles -->

<!-- public\static\Bootstrap\js -->
        
<link type="image/x-icon" href="/public/uploads/cache/images/osc1/logo/qrcode_7-16x15.jpg" rel="icon">
<link type="image/x-icon" href="/public/uploads/cache/images/osc1/logo/qrcode_7-16x15.jpg" rel="bookmark">

<script src="__PUBLIC__/jquery-weui/dist/js/jquery-weui.min.js"></script>
<script src="/public/static/js/jquery/jquery-2.1.4.min.js"></script>
<script src="/public/static/Bootstrap/js/bootstrap.min.js"></script>


<script src="/public/static/js/jquery/jquery-migrate-1.2.1.min.js"></script>
            
        
<script src="/public/static/artDialog/artDialog.js"></script>
<link href="/public/static/artDialog/skins/default.css" rel="stylesheet" type="text/css" />         
        
<script>
            
</script>
<script src="/public/static/js/oscshop_common.js"></script>
<link href="__PUBLIC__/view_res/mobile/css/wshop_company_center.css" type="text/css" rel="Stylesheet" />
<link href="__PUBLIC__/view_res/mobile/css/uc.css" type="text/css" rel="Stylesheet" />

{/block} 

{block name="header"}
{include file="public/top-nav" /}
{/block}

{block name="content"}   
<style>
/*.user{
    position: relative;
    color: #444;
    padding-left: 20px;
    line-height: 30px;
    font-size: 14px;

    border-bottom: 1px solid #eee;
    background: url(../images/icon_bar-right.png) 97.5% center no-repeat #fefefe;
    background-size: 15px 16px;
    display: block;
    outline: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}*/
table tr{

    position: relative;
    color: #444;
    padding-left: 50px;
    line-height: 40px;
    font-size: 14px;
    background: url(../images/icon_bar-right.png) 97.5% center no-repeat #fefefe;

}
td{padding-left: 18px;}
</style>
<!-- from -->
<p style="height: 30pt; line-height: 30pt; background: #37485c;">
    <a style="margin-left:30px; font-size: 18px; color: #fff;"><strong>配票</strong></a>
</p>
<form  action="/mobile/financing/ticket" id="from1" method="post">
    {:token()}


  
    



{if condition="2 eq $rang_order[0]['state']"}
    <header class="Thead">交易所</header>

        <div style="padding:0 10px;">
            <div class="gs-text">
                <input type="text" readonly= "true" value="{volist name="exchange" id="p" empty="$exchange"} 
                    {if condition="$p.id eq $rang_order[0]['exchange_id']"}{$p.name}
                    {/if}
                    {/volist}
                "> 
        </div>
    </div>
{/if}  
                       
        
    
        
            
            


{if condition="2 eq $rang_order[0]['state']"}
            
<header class="Thead">交易所的主账号</header>
    
    <div style="padding:0 10px;">
        <div class="gs-text">
                <input type="text" readonly= "true" value="{$rang_order[0]['trade_id']}">
            </div>
        </div>
{/if}
        


{if condition="2 eq $rang_order[0]['state']"}
        <header class="Thead">交易所的副账号</header>
            <div style="padding:0 10px;">
                <div class="gs-text">
                <input type="text" readonly= "true" value="{$rang_order[0]['sub_trade_id']}">
            </div>
        </div>
{/if}


    <header class="Thead">姓名</header>
    <div style="padding:0 10px;">
        <div class="gs-text">
            <input type="text" readonly= "true" value="{$rang_order[0]['id_name']}">
        </div>
    </div>
    <header class="Thead">身份证号码</header>
    <div style="padding:0 10px;">
        <div class="gs-text">
            <input type="text" readonly= "true" value="{$rang_order[0]['id_card']}">
        </div>
    </div>
{if condition="2 eq $rang_order[0]['state']"}
    <header class="Thead">交易品种</header>
    <div style="padding:0 10px;">
        <div class="gs-text">
            <input type="text" readonly= "true"
                 value="{volist name="variety"  id="p" empty="$variety"}
                    {if condition="$p.id eq $rang_order[0]['exchange_variety_id']"}{$p.name}{/if}              
                    {/volist}" tabindex="4" placeholder="" >
        </div>
    </div>
    {/if}

    {if condition="2 eq $rang_order[0]['state']"}
    <header class="Thead">交易品种编码</header>
    <div style="padding:0 10px;">
        <div class="gs-text">
             <input type="text" readonly= "true" value="{$rang_order[0]['variety_id']}">
        </div>
    </div>
    {/if}  

    <header class="Thead">数量</header>
    <div style="padding:0 10px;">
        <div class="gs-text">
            <input type="text" readonly= "true" value="1">
        </div>
    </div>
    {if condition="3 eq $rang_order[0]['state']"}
    <header class="Thead">审批意见</header>
    <div style="padding:0 10px;">
        <div class="gs-text">
            <textarea readonly="true" style="width: 100%;" rows="4">{$rang_order[0]['desc']}</textarea>
           
        </div>
    </div>
    {/if}
    <header class="Thead">当前状态</header>  
    <div class="gs-text">
    <h4>
    <span class="label label-danger">
     {if condition="0 eq $rang_order[0]['state']"}待申请{/if}
     {if condition="1 eq $rang_order[0]['state']"}待审批{/if}
     {if condition="2 eq $rang_order[0]['state']"}已审核{/if}
     {if condition="3 eq $rang_order[0]['state']"}审批不通过，请根据审批意见重新提交{/if}
    </span>
    </h4>

    </div>
</div>

    


    
{if condition="0 eq $rang_order[0]['state']"}  
<input type="submit" class="button" style="width:95%;margin:0 auto;"  value="提交配票申请"/>
{/if}
{if condition="3 eq $rang_order[0]['state']"}  
<input type="submit" class="button" style="width:95%;margin:0 auto;"  value="重新提交配票申请"/>
{/if}
{if condition="2 eq $rang_order[0]['state']"}  
<p style="height: 30pt; line-height: 30pt; text-align: center; background: #37485c;">
<a href="/mobile/financing/frist" style="color: #fff;">恭喜您，可以开始理财了！(点击进入)</a>
</p>
{/if}

{/block}
{block name="script"}
<script>
$('#reg-btn').click(function(){
    $.post(
            '{:url("financing/frist")}',    
        $('input[type="text"],input[type="select"],input[type="hidden"]'),
        function(d){
            if(d.error){
                $.toast(d.error, "forbidden");
            }else if(d.success){
                $.toast(d.success);
                //sleep(500);
                if(d.state==1)
                {
                    window.location.href="/mobile/financing/frist"; 
                }
                if(d.state==2)
                {
                    window.location.href="/mobile/financing/second"; 
                }
                if(d.state==3)
                {
                    window.location.href="/mobile/financing/third"; 
                }
                if(d.state==4)
                {
                    window.location.href="/mobile/financing/fourth"; 
                }
                if(d.state==5)
                {
                    window.location.href="/mobile/financing/fifth"; 
                }                
            }
        }
    );
});











</script>

<script type="text/javascript">
    
        {notempty name='error'}
        
            alert('{$error}');
        {/notempty}
</script>

{/block}